﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RegisterationCommon.School;
using RegisterationCommon.Common;

namespace RegisterationSystem.Template
{
    public partial class Site_School : System.Web.UI.MasterPage
    {
        public string datetime="";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!SchoolAccount.Current.IsLogin())
                {
                    Message.Send(10001);
                }
                bond();
            }
        }
        public void bond()
        {
            SchoolInfo s = new SchoolInfo();
            if (s.GetSchoolInfoByID(Convert.ToInt32(Cookies.Get("SchID"))))
            {
                this.xsschoolname.InnerText = s.Name;
            }
            this.xsusername.InnerText = Cookies.Get("SchoolAccountName");
            datetime = DateTime.Now.ToString();
            this.xsdatenow.InnerText =DateTime.Now.ToString();
        }

        protected void Timer1_Tick(object sender, EventArgs e)
        {
            this.xsdatenow.InnerText =DateTime.Now.ToString();
        }
    }
}